home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.9 KB | 105 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFoundI.cpp
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWENVDEF_H
- #include "FWEnvDef.h"
- #endif
-
- #ifndef som_h
- #include <som.h>
- #endif
-
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- #ifdef FW_DEBUG
- #if defined(FW_BUILD_MAC) && !defined(__EVENTS__)
- #include <Events.h>
- #endif
- #endif
-
- //========================================================================================
- // Runtime Informations
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment framework
- #endif
-
- //========================================================================================
- // Prototypes
- //========================================================================================
-
- #if defined(SYMANTEC_CPLUS) && defined(FW_BUILD_MAC)
- #define FW_FOUNDCFMINIT PartCFMInit
- #define FW_FoundSOMInit main
- #if !FW_LIB_EXPORT_PRAGMAS
- #pragma internal on
- #endif
- #endif
-
- SOMEXTERN void SOMLINK FW_FoundSOMInit (long, long, string );
- extern "C" pascal OSErr FW_FOUNDCFMINIT (CFragInitBlockPtr initBlkPtr);
-
- #if GENERATINGPOWERPC
- #ifdef __MWERKS__
- extern "C" void __sinit();
- #elif defined __MRC__
- extern "C" void __CPlusInit();
- #endif
- #endif
-
- //========================================================================================
- // Initialization functions
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_FoundSOMInit
- //----------------------------------------------------------------------------------------
-
- SOMEXTERN void SOMLINK FW_FoundSOMInit (long majorVersion,
- long minorVersion,
- string className)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_FOUNDCFMINIT
- //----------------------------------------------------------------------------------------
-
- extern "C" pascal OSErr FW_FOUNDCFMINIT (CFragInitBlockPtr initBlkPtr)
- {
- #ifdef FW_DEBUG
- // [HLX] can't use FW_IsCommandKeyPressed because in OS Layer
- KeyMap theKeyMap;
- ::GetKeys(theKeyMap);
- const unsigned char *theKeys = (const unsigned char *) theKeyMap;
- if ((theKeys[0x37 >> 3] >> (0x37 & 7)) & 1)
- DebugStr("\pFW_FOUNDCFMINIT");
- #endif
-
- // Shared libraries don't get there static objects initialized correctly without
- // calling __sinit or __CPlusInit for MetroWerks or MrC respectively.
-
- #if GENERATINGPOWERPC
- #ifdef __MWERKS__
- __sinit();
- #elif defined __MRC__
- __CPlusInit();
- #endif
- #endif
-
- return noErr;
- }
-